package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.service.OrderService;
import org.order.pojo.shopOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @RequestMapping("/createOrder")
    public shopOrder createOrder(Long pid, Long uid){
        shopOrder order = orderService.createOrder(pid, uid);
        return order;
    }


}
